package no.group.gowther.service.dto.param;

import no.group.gowther.enums.OnePieceType;

import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

public class OnePieceDetailQueryDTO extends Page {
    private List<OnePieceType> type;
    private List<Long> tagId;
    private int index;

    public OnePieceDetailQueryDTO() {}

    public OnePieceDetailQueryDTO(Page page) {
        super(page);
    }

    public List<OnePieceType> getType() {
        return type == null ? Collections.emptyList() : type;
    }

    public List<String> getTypeString() {
        return getType().stream().map(OnePieceType::name).collect(Collectors.toList());
    }

    public void setType(List<OnePieceType> type) {
        this.type = type;
    }

    public List<Long> getTagId() {
        return tagId == null ? Collections.emptyList() : tagId;
    }

    public void setTagId(List<Long> tagId) {
        this.tagId = tagId;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
